package com.beijiteshop.shop.model.api.response

import androidx.databinding.ObservableBoolean
import com.beijiteshop.shop.app.ShopApplication
import com.chad.library.adapter.base.entity.MultiItemEntity

/**
 * @Author LiaoZhongKai
 * @Date 2021/3/16 11:11
 * @Description
 */
data class NotificationDetailEntity(override val itemType: Int, val date: String,
                                    val title: String, var isRead: ObservableBoolean,
                                    val time: String, val content: String,var message: NotificationMessageBean?): MultiItemEntity{
    companion object{
        val TYPE_DATE = 1
        val TYPE_ITEM = 2
    }
}

data class NotificationCountBean(
    var count: Int,
    var time: String
)

data class NotificationDetailListBean(
    var date: String,
    var message: List<NotificationMessageBean>
)

data class NotificationMessageBean(
    var bus_MessageID: String,
    var bus_OrdersID: String?,
    var createTime: String,
    var isLook: String,
    var message: String,
    var status: String
){
    val isRead: Boolean
    get() {
        return isLook == "1"
    }

    val isOrder: Boolean
    get(){
        return !bus_OrdersID.isNullOrEmpty()
    }
}